<?php

 if($responseResult['total_num']!='0'){
?>

	<dl class="reply_box">
     <dt>共有<?php echo $responseResult['total_num'];?>个回应：</dt>

	<?php
		$responseCount = 1;
		
		if($responseResult['result']){
		
			foreach($responseResult['result'] as $response)
			{
		        echo '<dd>';
		                    		
				if($response['is_anonymous']!='1')
				{   				
				    $userResult=$userDAO->GetUserByID($response['user_id']);		            
				    echo '<div class="reply_1">
				    	   <a href="'.edp_href_link(PAGENAME_USER_INFO, 'uid='.$userResult['id']).'">          
							<img src="'.EdpGetAvatarUrl($userResult['logo_path']).'" width="40" height="40"  />
		                   </a></div>';                   
		            echo '<div class="reply_2"><h1><span><a href="'.edp_href_link(PAGENAME_USER_INFO, 'uid='.$userResult['id']).'">'.$userResult['nick'].'</a></span><div class="degree_box"> <span class="'.getUserRankClass($userResult['contribution']).'"></span></div><span> 发表于 '.$response['date'].'</span></h1><h2>#'.$responseCount.'</h2></div>';
		  
		         }else{ 	
		         	
		         	$response['user_ip'] = preg_replace('/((?:\d+\.){3})\d+/', "\\1*", $response['user_ip']);
		         	echo '<div class="reply_1">
		         			<img src="'.DEFAULT_AVATAR_URL.'" width="40" height="40" />
		         		  </div>';
		         	echo '<div class="reply_2"><h1><span>匿名用户 | '.$response['user_ip'].' </span><span>发表于 '.$response['date'].'</span></h1><h2>#'.$responseCount.'</h2></div>';	   
				 }
				  
				 echo '<div class="reply_3">';
				 secho($response['content']);
		         echo '</div></dd>';
		         
		         $responseCount = $responseCount + 1;
				 
				} 	
		}	 	 	  
	?>
	
   </dl>

<?php  } ?>    	
   
   
		<div class="form_box">
     	 <form action="<?php echo edp_href_link(PAGENAME_REVIEW_INFO,'rid='.$rid);?>" onsubmit="return check_validation();" grayOnCommit=".form_box" method="POST"  id="addResponseForm">
				<input type="hidden" name="action" value="addResponse" />
				<div class="form_top"></div>
				<div id="reponse_anchor" class="form_middle">
					<div class="form_item">
						
						<h1 id="reply_point">我的回应</h1><h2><textarea class="form_textarea" name="response" id="response"><?php global $responseContent; if(isset($responseContent)) secho(  $responseContent ) ; ?></textarea></h2>
					</div>   

					 <?php
				
						if(edp_isset_session('userid')){
					 ?>		
					  <div class="form_item">
						<h1></h1>
						<h2>
					    	<input type="radio" id="post_login" name="post_author_type" /><span><?php echo edp_getsession('username'); ?></span>  
						    <input type="radio" id="post_anonym" name="post_author_type" /><span>匿名回复</span>  
						</h2>
				      </div>               
					<?php 	
						}else{
					 ?>							
					   <div class="form_item">
						<h1></h1>
						<h2>
							<input type="hidden" name="post_author_type" value='0'/>
					    	如果要发表回复 请<a href="<?php echo edp_href_link(PAGENAME_LOGIN); ?>"> 登录 </a>或者<a href="<?php echo edp_href_link(PAGENAME_REGISTER); ?>"> 注册</a>  
						</h2>
				       </div>  
					   	<?php		
						}					
				 	?>     		
					   <div class="form_item">
						<h1></h1>
						<h2>
							<div class="form_title">验证码：</div>
		                    <input type="text" id="vcode" name="vcode" class="form_text"/> 
						</h2>
					   </div>
						  
					   <div class="form_item" id="vbox">
						<h1></h1>
						<h2>
		                    <img id='vimg'  src="" />&nbsp;&nbsp;<a href="javascript:refresh_vcode('vcode/?tiny='+Math.random());">换一张</a>                    
						</h2>						
				       </div>  

				

					<div class="form_item">
						<h1></h1>
						<h2>                                	
							<input type="submit" class="btn_1" value="提交回应" />      
						</h2>
					</div>
				</div>
				<div class="form_bottom"></div>
			</form>
		</div>   
		
        
 </div>
